package com.dayuanit.dy14.atm.demo2.dy14atmcommon.enums;

import com.dayuanit.dy14.atm.demo2.dy14atmcommon.exception.BizException;

public enum FinanceEnum {
    //0-待审核 1-审核成功 2-取消 3-处理成功
    待审核((byte)0), 审核成功((byte)1), 取消((byte)2),处理成功((byte)3);

    private byte k;

    private FinanceEnum(byte k) {
        this.k = k;
    }

    public static FinanceEnum getEnum(byte k) {
        for (FinanceEnum fe : FinanceEnum.values()) {
            if (fe.k == k) {
                return fe;
            }
        }

        throw new BizException("非法的状态");
    }

    public byte getK() {
        return k;
    }
}
